package han;

import java.util.Scanner;

public class J12SungJuk {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		SungJuk taehee=new SungJuk();
		SungJuk suji=new SungJuk();
		SungJuk jihyun=new SungJuk();
		taehee.name="태희";
		System.out.println("태희의 점수를 입력하세요");
		System.out.println("국어점수를 입력하세요");
		taehee.kor = sc.nextInt();
		System.out.println("영어점수를 입력하세요");
		taehee.eng = sc.nextInt();
		System.out.println("수학점수를 입력하세요");
		taehee.mat = sc.nextInt();
		System.out.println("수학점수를 입력하세요");
		System.out.println("수지의 점수를 입력하세요");
		suji.name="수지";
		System.out.println("국어점수를 입력하세요");
		suji.kor = sc.nextInt();
		System.out.println("영어점수를 입력하세요");
		suji.eng = sc.nextInt();
		System.out.println("수학점수를 입력하세요");
	
		System.out.println("지현의 점수를 입력하세요");
		jihyun.name="지현";
		System.out.println("국어점수를 입력하세요");
		jihyun.kor = sc.nextInt();
		System.out.println("영어점수를 입력하세요");
		jihyun.eng = sc.nextInt();
		System.out.println("수학점수를 입력하세요");
		taehee.mat = sc.nextInt();
		System.out.println("이름은= "+taehee.name);
		System.out.println("총점= "+taehee.getTotal());
		System.out.println("평균="+taehee.getAverage());
		System.out.println("등급= "+taehee.getGrade());
		System.out.println("이름은= "+jihyun.name);
		System.out.println("총점= "+jihyun.getTotal());
		System.out.println("평균="+jihyun.getAverage());
		System.out.println("등급= "+jihyun.getGrade());
		System.out.println("이름은= "+suji.name);
		System.out.println("총점= "+suji.getTotal());
		System.out.println("평균="+suji.getAverage());
		System.out.println("등급= "+suji.getGrade());
		sc.close();
	}

}
	class SungJuk{
		
		String name;
		int kor,eng,mat,tot;
		double avg;
		char grd;
		public int getTotal(){
			return tot = kor+eng+mat;
		}
		public double getAverage(){
			return avg = (double)getTotal() / 3;
		}
		public char getGrade(){
			switch((int)getAverage()/10){
			case 10 : grd = '수' ;break;
			case 9 : grd = '수'; break;
			case 8 : grd = '우'; break;
			case 7 : grd = '미'; break;
			case 6 : grd = '양'; break;
			default : grd='가';
			}
			return grd;
		}
	}//sungjuk